home *** CD-ROM | disk | FTP | other *** search
-
-
-
- eeeeffffssss((((4444)))) eeeeffffssss((((4444))))
-
-
-
- NNNNAAAAMMMMEEEE
- efs - layout of the Extent File System
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ppppaaaarrrraaaammmm....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ffffssss////eeeeffffssss....hhhh>>>>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- An Extent File System can reside on a regular disk partition or on a
- logical volume; see _l_v(1M). The disk partition or volume is divided into
- a certain number of 512-byte sectors, also called _b_a_s_i_c _b_l_o_c_k_s. The
- current maximum size limit of an Extent File System is 16777214 blocks,
- equivalent to 8 gigabytes.
-
- The Extent File System imposes a common format for certain vital
- information on its underlying storage medium. Basic block 0 is unused
- and is available to contain a bootstrap program or other information.
- Basic block 1 is the _s_u_p_e_r_b_l_o_c_k. The format of an Extent File System
- superblock is:
-
- /*
- * Structure of the superblock for the Extent File System
- */
- struct efs {
- /*
- * This portion is read off the volume
- */
- long fs_size; /* size of filesystem, in sectors */
- long fs_firstcg; /* bb offset to first cg */
- long fs_cgfsize; /* size of cylinder group in bb's */
- short fs_cgisize; /* bb's in inodes per cylinder group */
- short fs_sectors; /* sectors per track */
- short fs_heads; /* heads per cylinder */
- short fs_ncg; /* # of groups in filesystem */
- short fs_dirty; /* fs needs to be fsck'd */
- time_t fs_time; /* last superblock update */
- long fs_magic; /* magic number */
- char fs_fname[6]; /* filesystem name */
- char fs_fpack[6]; /* filesystem pack name */
- long fs_bmsize; /* size of bitmap in bytes */
- long fs_tfree; /* total free data blocks */
- long fs_tinode; /* total free inodes */
- long fs_bmblock; /* bitmap location */
- long fs_replsb; /* location of replicated superblock. */
- char fs_spare[24]; /* space for expansion */
- long fs_checksum; /* checksum of volume portion of fs */
- /*
- * The remainder of this structure, defined fully in
- * <sys/fs/efs_sb.h> is used by the operating system only.
- */
- };
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- eeeeffffssss((((4444)))) eeeeffffssss((((4444))))
-
-
-
- The struct efs that is defined in <_s_y_s/_f_s/_e_f_s__s_b._h> contains more fields.
- The extra fields are used internally by the operating system and are not
- discussed here. If in doubt, consult the include file for any recent
- changes to both the section discussed here and changes to relevant
- definitions.
-
- _f_s__s_i_z_e holds the size in basic blocks of the filesystem. This variable
- is filled in when the filesystem is first created with _m_k_f_s(1M).
-
- _f_s__f_i_r_s_t_c_g contains the basic block offset to the first _c_y_l_i_n_d_e_r _g_r_o_u_p.
- There are _f_s__n_c_g cylinder groups contained in the filesystem. Each
- cylinder group is composed of _f_s__c_g_f_s_i_z_e basic blocks, of which
- _f_s__c_g_i_s_i_z_e basic blocks are used for inodes.
-
- _f_s__s_e_c_t_o_r_s and _f_s__h_e_a_d_s are used to specify the geometry of the
- underlying disk containing the filesystem. _f_s__h_e_a_d_s is in fact currently
- unused and should not be relied upon.
-
- _f_s__d_i_r_t_y is a flag that indicates if the filesystem needs to be checked
- by the _f_s_c_k(1M) program.
-
- The _f_s__t_i_m_e field contains the time stamp of when the filesystem was last
- modified.
-
- _f_s__n_a_m_e holds the _n_a_m_e of the filesystem (where it is mounted, more or
- less) and _f_s__f_p_a_c_k contains which volume this filesystem is. The
- _f_s__f_p_a_c_k field is singularly useless, but is provided for utility
- compatibility.
-
- _f_s__m_a_g_i_c is used to tag the superblock of the filesystem as an Extent
- File System. There are two values that are currently used and a macro
- used to test for either one.
-
- #define EFS_MAGIC 0x072959
- #define EFS_NEWMAGIC 0x07295A
- #define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
-
- The NEWMAGIC version was added in IRIX 3.3 when the superblock format
- changed slightly. Filesystems created with that version of _m_k_f_s or later
- (or modified with _m_k_f_s ----rrrr or extended with _g_r_o_w_f_s) get the new magic
- number; otherwise the older magic number is retained, if present.
-
- The _f_s__b_m_s_i_z_e field contains, in bytes, the size of the data block
- bitmap. The data block bitmap is used for data block allocation. Each
- one in the bitmap indicates a free block.
-
- The _f_s__b_m_b_l_o_c_k field contains the location of the bitmap if it has been
- moved from its default location (basic block 2) because the filesystem
- has been constructed on a logical volume that has been extended (see
- _g_r_o_w_f_s(1M)).
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- eeeeffffssss((((4444)))) eeeeffffssss((((4444))))
-
-
-
- _f_s__t_f_r_e_e and _f_s__t_i_n_o_d_e contain the total free blocks and inodes,
- respectively.
-
- The _f_s__r_e_p_l_s_b field contains the location of a replicated superblock, if
- one exists.
-
- The _f_s__s_p_a_r_e field is reserved for future use.
-
- Lastly, the _f_s__c_h_e_c_k_s_u_m variable holds a checksum of the above fields
- (not including itself).
-
- During the _m_o_u_n_t(1M) of the filesystem, the _f_s__d_i_r_t_y and _f_s__c_h_e_c_k_s_u_m
- fields are examined. If _f_s__d_i_r_t_y is non-zero, or the _f_s__c_h_e_c_k_s_u_m
- variable does not match the systems computed checksum, the filesystem
- must be cleaned with _f_s_c_k before it can be mounted. If the filesystem is
- the _r_o_o_t partition, this check is ignored, as it is necessary to be able
- to run _f_s_c_k on a dirty _r_o_o_t from a dirty _r_o_o_t. For the format of an
- inode and its flags, see _i_n_o_d_e(4).
-
- FFFFIIIILLLLEEEESSSS
- /usr/include/sys/fs/efs*.h
- /usr/include/sys/stat.h
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fsck(1M), growfs(1M), mkfs(1M), inode(4).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-